"""Helper functions

Consists of functions to typically be used within templates, but also
available to Controllers. This module is available to templates as 'h'.
"""
# Import helpers as desired, or define your own, ie:

from webhelpers.html.tags import *
from pyramid.url import route_url

def titlecase(context, string):
    from titlecase import titlecase as _titlecase
    return _titlecase(string.lower())


def split_address(context, address):
    if address is None:
        return ""
    
    split = address.split("Chicago, Illinois")
    
    return split[0] + "<br/>Chicago, IL " + split[1]


def chart(data):
    from pylons.templating import render_mako
